package com.example.rest.controller;

import com.example.api.entiry.Organ;
import com.example.rest.service.TestService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author loubenke
 * @date 2024/3/7 15:26
 */
@Slf4j
@RestController
@RequestMapping("/test")
@RequiredArgsConstructor
public class TestController {
    @Autowired
    private TestService testService;

    @GetMapping(value = "/query")
    public Organ query(@RequestParam("id") int id) {
        return testService.query(id);
    }
}
